#include <stdio.h>

int main() {
    int arr1[] = {3, -1, -2, 4, 5, -6, 9};
    int arr1_len = sizeof(arr1) / sizeof(arr1[0]);
    int n = arr1_len / 2;
    int count = 0;
    int count1 = arr1_len - 1;
    for (int i = 0; i < arr1_len; ++i) {
        if(arr1[i] >= 0){
            while (count <= n)
            arr1[count++] = arr1[i];
        } else{
            arr1[count1--] = arr1[i];
        }
    }
    for (int i = 0; i < sizeof(arr1) / sizeof(arr1[0]); ++i){
        printf("%d",arr1);
    }
    return 0;
}
